package cn.edu.scau.cmi.xuxingao.composite.consistent;

import java.util.List;

public class ConsistentLeaf extends ConsistentComponent{
	private String name;
	
	@Override
	public String intro(int i) {
		String blank="";
		for(int j=0;j<i;j++) {
			blank+="       ";
		}
		return blank+name;
	}
	
	public ConsistentLeaf() {
		
	}
	public ConsistentLeaf(String name) {
		this.name=name;
	}
	
	public void add(ConsistentComponent child) {
		System.out.println("我是个人，不能拥有子团队");
	}
	
	public void remove(ConsistentComponent child) {
		System.out.println("我是个人，无下属子团队");
	}
	
	public List<ConsistentComponent> getChildren(){
		System.out.println("我是个人，无下属子团队");
		return null;
		
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
}
